// 封装所有请求操作
import axios from '../../index'
import qs from 'qs'


// 获取供应商列表接口
export const supplierList = (data) => {
    return axios({
        url: '/purSelStock/querySupply',
        // method: 'GET',
        // params: datas
        method: 'POST',
        data: qs.stringify(data)
    })
}

// 添加供应商接口
export const supplierAdd = (datas) => {
    return axios({
        url: '/purSelStock/addSupply',
        method: 'POST',
        data: datas
    })
}

// 修改供应商接口
export const supplierEdit = (datas) => {
    return axios({
        url: '/purSelStock/updateSupply',
        method: 'POST',
        data: datas
    })
}

// 删除供应商接口
export const supplierDel = (datas) => {
    return axios({
        url: '/purSelStock/deleteSupply',
        method: 'POST',
        data: qs.stringify(datas)
    })
}

//搜索供应商接口
export const supplierSearch = (datas) => {
    return axios({
        url: '/purSelStock/searchSupply2',
        method: 'POST',
        data: qs.stringify(datas)
    })
}

//高级搜索供应商接口
export const supplierHighSearch = (datas) => {
  return axios({
      url: '/purSelStock/searchSupply1',
      method: 'POST',
      data: qs.stringify(datas)
  })
}